package com.example.mybatisplus.service.impl;

import com.example.mybatisplus.model.domain.VisitInfo;
import com.example.mybatisplus.mapper.VisitInfoMapper;
import com.example.mybatisplus.service.VisitInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * ������Ϣ�� 服务实现类
 * </p>
 *
 * @author lxp
 * @since 2023-10-16
 */
@Service
public class VisitInfoServiceImpl extends ServiceImpl<VisitInfoMapper, VisitInfo> implements VisitInfoService {
    @Autowired
    private VisitInfoMapper visitInfoMapper;
    //获取全部数据通过页码等限制展示
    @Override
    public List<VisitInfo> getAll(Long page,Long limit,VisitInfo visitInfo) {
        List<VisitInfo> visitInfos=visitInfoMapper.getAll(page,limit,visitInfo);
        return visitInfos;
    }

    //获取数据总数
    @Override
    public List<VisitInfo> getTotal(VisitInfo visitInfo) {
        List<VisitInfo> visitInfos=visitInfoMapper.getTotal(visitInfo);
        return visitInfos;
    }

    @Override
    public VisitInfo getAllById(Long visitId) {
        VisitInfo  visitInfo=visitInfoMapper.getAllById(visitId);
        return visitInfo;
    }
    //进行假删除
    @Override
    public void deleteByVisitIds(List<Long> visitIds) {
        visitInfoMapper.deleteByVisitIds(visitIds);
    }

    @Override
    public void passByVisitId(Long visitId, Long type,Long status) {
        visitInfoMapper.passByVisitId(visitId,type,status);
    }
    //修改初访信息
    @Override
    public void modifyInit(VisitInfo visitInfo) {
        visitInfoMapper.modifyInit(visitInfo);
    }

    @Override
    public void modifyResult(VisitInfo visitInfo) {
        visitInfoMapper.modifyResult(visitInfo);
    }
    //新增初访
    @Override
    public void addInit(VisitInfo visitInfo) {
        visitInfoMapper.addInit(visitInfo);
    }
    //查询初访信息对应的咨询信息
    @Override
    public List<VisitInfo> getInitCon() {
        List<VisitInfo> visitInfos=visitInfoMapper.getInitCon();
        return visitInfos;
    }


}
